using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

namespace GameObjectsAndEquipment
{
    public class GameObject
    {
        private Vector2 position = new Vector2(0,0);
        private Vector2 velocity = new Vector2(0,0);


        public GameObject()
        {
        }

        public GameObject(Vector2 position)
        {
            this.position = position;
        }

        #region Properties

        public Vector2 Position
        {
            get { return position; }
            set { position = value; }
        }

        public float X
        {
            get { return position.X; }
            set { position.X = value; }
        }

        public float Y
        {
            get { return position.Y; }
            set { position.Y = value; }
        }

        public Vector2 Velocity
        {
            get { return velocity; }
            set { velocity = value; }
        }

        #endregion


        #region Methods

        public virtual void Update(GameTime gametime) 
        { 
            UpdateVelocity(gametime);
        }

        private void UpdateVelocity(GameTime gametime)
        {

            position += velocity * ((float)gametime.ElapsedGameTime.Milliseconds/1000.0f);
        }
        #endregion

    }
}
